<?php
if (true === version_compare(phpversion(), '5.2.4', '<')) {
    exit('Boot failure ! (102)');
}

/**
 * Define path to project root
 *
 */
defined('PROJECT_ROOT')
    || define('PROJECT_ROOT',
              realpath(dirname(dirname(__FILE__))));

/**
 * Set include paths
 *
 * Typically, you will also want to add your library/ directory
 * to the include_path, particularly if it contains your ZF install
 */
set_include_path(implode(PATH_SEPARATOR, array(
    PROJECT_ROOT . '/library'
)));

class helloWorld
{
    public function say($sMessage)
    {
        return 'You said: ' . $sMessage;
    }
}

require_once('Zend/Amf/Server.php');
$server = new Zend_Amf_Server();
$server->setClass("helloWorld");
$response = $server->handle();
echo $response;
